export interface KV<T> {
  [key: string]: T;
}
export interface KVString extends KV<string> {}
export interface KVNumber extends KV<number> {}
export interface KVAny extends KV<any> {}

export interface RKV<T> {
  readonly [key: string]: T;
}
export interface RKVString extends RKV<string> {}
export interface RKVNumber extends RKV<number> {}
export interface RKVAny extends RKV<any> {}
export interface Object {
  [key: string]: any;
}
export interface RequestParam extends Object {}
export interface ResponseData {
  code?: number;
  msg?: string;
  data: {
    total?: number;
    pageIndex?: number;
    pageSize?: number;
    dt?: any[];
  };
}

export class Data4<T> {
  code: number;
  msg: string;
  data: T;

  constructor(response: ResponseData) {
    this.code = response.code;
    this.msg = response.msg;
    this.data = response.data as T;
  }
}
